package com.jddup.program.comparator.sqlserver;

import com.jddup.program.comparator.AddPkDDLBuilder;

/**
 * Created by ZZB on 2017/12/11.
 */
public class SqlServerAddPkDDLBuilderImpl implements AddPkDDLBuilder {
    private static final String ADD_SQL = "ALTER TABLE \"{tableName}\" ADD constraint PK_{tableName}_ID PRIMARY KEY ( {pkColumn} );";
    private static final String DROP_SQL = "ALTER TABLE \"{tableName}\" DROP constraint PK_{tableName}_ID;";

    @Override
    public String addSqlTemplate() {
        return ADD_SQL;
    }

    @Override
    public String dropSqlTemplate() {
        return DROP_SQL;
    }
}
